import {
	createSSRApp
} from "vue";
import App from "./App.vue";
import uviewPlus from "uview-plus";// 引入uview-ui

// 尝试覆盖uni.createIntersectionObserver方法以启用nativeMode
const originalCreateIntersectionObserver = uni.createIntersectionObserver;
uni.createIntersectionObserver = function(component, options = {}) {
  // 启用nativeMode以提高性能
  options.nativeMode = true;
  return originalCreateIntersectionObserver.call(this, component, options);
};

export function createApp() {
	const app = createSSRApp(App);
	app.use(uviewPlus);
	return {
		app,
	};
}